﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            //dongwuyuan();
            //jisuan();
            shape();
        }
        static void dongwuyuan()
        {
            Console.WriteLine("1、猫；2、老虎；3、燕子；4、老鹰");
            int a = int.Parse(Console.ReadLine());
            switch (a)
            {
                case 1:
                    mao m = new mao();
                    m.eat();
                    m.shui();
                    m.jiao();
                    m.tui();
                    m.yj();
                    break;
                case 2:
                    laohu l = new laohu();
                    l.eat();
                    l.shui();
                    l.jiao();
                    l.tui();
                    l.yj();
                    break;
                case 3:
                    yanzi y = new yanzi();
                    y.eat();
                    y.shui();
                    y.jiao();
                    y.tui();
                    y.yj();
                    break;
                case 4:
                    laoying ly = new laoying();
                    ly.eat();
                    ly.shui();
                    ly.jiao();
                    ly.tui();
                    ly.yj();
                    break;
                default:
                    break;
            }
        }
        static void jisuan()
        {
            Console.WriteLine("输入a、b的值");
            int a = int.Parse(Console.ReadLine());
            int b = int.Parse(Console.ReadLine());
            Console.WriteLine("输入+-*/");
            string c = Console.ReadLine();
            switch (c)
            {
                case "+":
                    protected1 p1 = new protected1();
                    p1.a = a;
                    p1.b = b;
                    p1.DisplayResult();
                    break;
                case "-":
                    protected2 p2 = new protected2();
                    p2.a = a;
                    p2.b = b;
                    p2.DisplayResult();
                    break;
                case "*":
                    protected3 p3 = new protected3();
                    p3.a = a;
                    p3.b = b;
                    p3.DisplayResult();
                    break;
                case "/":
                    protected4 p4 = new protected4();
                    p4.a = a;
                    p4.b = b;
                    p4.DisplayResult();
                    break;
                default:
                    break;
            }
        }
        static void shape()
        {
            Console.WriteLine("1、圆形；2、正方形；");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("输入图形的颜色");
            string b = Console.ReadLine();
            switch (a)
            {
                case 1:
                    Circle c = new Circle();
                    Console.WriteLine("输入半径");
                    int radius = int.Parse(Console.ReadLine());
                    c.radius = radius;
                    c.GetArea();
                    break;
                case 2:
                    Square s = new Square();
                    Console.WriteLine("输入半径");
                    int sideLen = int.Parse(Console.ReadLine());
                    s.sideLen = sideLen;
                    s.GetArea();
                    break;
                default:
                    break;
            }
        }
    }
}
